package somepackage;

import static org.junit.Assert.*;

import org.junit.Test;

import com.sun.org.apache.xml.internal.serializer.utils.Utils;

public class FibonacciTest
{
	int[] basicFibs = { 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377,	610, 987, 1597, 2584, 4181, 6765 };	// 0-20
	

	@Test
	public void initTest()
	{
		assertEquals(Fibonacci.fib(0), 0);
		assertEquals(Fibonacci.fib(1), 1);
	}
	
	@Test
	public void test2()
	{
		assertEquals(Fibonacci.fib(2), basicFibs[2]);
	}
	
	@Test
	public void test3() {
		assertEquals(Fibonacci.fib(3), basicFibs[3]);
	}
	
	@Test
	public void test5()
	{
		assertEquals(Fibonacci.fib(5), basicFibs[5]);
	}

	@Test
	public void testBig1()
	{
		System.out.println("testing big1: fib11");
		assertEquals(Fibonacci.fib(11), basicFibs[11]);
	}
	
	@Test
	public void testBig2()
	{
		System.out.println("testing big2: fib12");
		assertEquals(Fibonacci.fib(12), basicFibs[12]);
	}
	
	@Test
	public void testBig3()
	{
		System.out.println("testing big3: fib20");
		assertEquals(Fibonacci.fib(20), basicFibs[20]);
	}
	
	@Test
	public void big_cpu_mem1()
	{
		System.out.println("testing big_cpu_mem1");
		assertEquals(Fibonacci.fib(40), 102334155 );
		System.out.println("testing finished");
	}
	
	@Test
	public void big_cpu_mem2()
	{
		System.out.println("testing big_cpu_mem2");
		assertEquals(Fibonacci.fib(40), 102334155 );
		System.out.println("testing finished");
	}
	
	@Test
	public void big_cpu_mem3()
	{
		System.out.println("testing big_cpu_mem3");
		assertEquals(Fibonacci.fib(40), 102334155 );
		System.out.println("testing finished");
	}
	
	@Test
	public void big_cpu_mem4()
	{
		System.out.println("testing big_cpu_mem4");
		assertEquals(Fibonacci.fib(40), 102334155 );
		System.out.println("testing finished");
	}
	
	@Test
	public void big_cpu_mem5()
	{
		System.out.println("testing big_cpu_mem5");
		assertEquals(Fibonacci.fib(40), 102334155 );
		System.out.println("testing finished");
	}
	
	@Test
	public void big_cpu_mem6()
	{
		System.out.println("testing big_cpu_mem6");
		assertEquals(Fibonacci.fib(40), 102334155 );
		System.out.println("testing finished");
	}
	
	@Test
	public void big_cpu_mem7()
	{
		System.out.println("testing big_cpu_mem7");
		assertEquals(Fibonacci.fib(40), 102334155 );
		System.out.println("testing finished");
	}
	
	@Test
	public void big_cpu_mem8()
	{
		System.out.println("testing big_cpu_mem8");
		assertEquals(Fibonacci.fib(40), 102334155 );
		System.out.println("testing finished");
	}
	
	@Test
	public void big_cpu_mem9()
	{
		System.out.println("testing big_cpu_mem9");
		assertEquals(Fibonacci.fib(40), 102334155 );
		System.out.println("testing finished");
	}
	
	@Test
	public void big_cpu_mem10()
	{
		System.out.println("testing big_cpu_mem10");
		assertEquals(Fibonacci.fib(40), 102334155 );
		System.out.println("testing finished");
	}
}
